<%@ include file="/WEB-INF/views/utils/includes.jsp"%>
<gf:layout>
	<gf:form>
		<tu:label text="label.domain.name">${user.domain}</tu:label>
		<tu:label text="label.user.firstName"><gf:input value="${user.firstName}" path="firstName" required="true" /></tu:label>
		<tu:label text="label.user.lastName"><gf:input value="${user.lastName}" path="lastName" required="true"/></tu:label>
		<tu:label text="label.user.username"><gf:input value="${user.username}" path="username" required="true"/></tu:label>
		<tu:label text="label.user.password"><gf:input value="${user.password}" path="password" required="true"/></tu:label>

<c:if test="${principal.administrator}">
	<tu:label text="label.user.roles">
		<c:forEach var="role" items="${roleList != null ? roleList : user.roles}">
			<tu:label text="${role.role}"><gf:checkbox value="${role.role}" path="roles" checked="${user.hasRole(role)}"/></tu:label>
		</c:forEach>
	</tu:label>
</c:if>
	</gf:form>
</gf:layout>
